package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.CapitalAccountMapper;
import com.ruoyi.system.domain.CapitalAccount;
import com.ruoyi.system.service.ICapitalAccountService;

/**
 * 资金账户Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-01
 */
@Service
public class CapitalAccountServiceImpl implements ICapitalAccountService 
{
    @Autowired
    private CapitalAccountMapper capitalAccountMapper;

    /**
     * 查询资金账户
     * 
     * @param id 资金账户主键
     * @return 资金账户
     */
    @Override
    public CapitalAccount selectCapitalAccountById(Long id)
    {
        return capitalAccountMapper.selectCapitalAccountById(id);
    }

    /**
     * 查询资金账户列表
     * 
     * @param capitalAccount 资金账户
     * @return 资金账户
     */
    @Override
    public List<CapitalAccount> selectCapitalAccountList(CapitalAccount capitalAccount)
    {
        return capitalAccountMapper.selectCapitalAccountList(capitalAccount);
    }

    /**
     * 新增资金账户
     * 
     * @param capitalAccount 资金账户
     * @return 结果
     */
    @Override
    public int insertCapitalAccount(CapitalAccount capitalAccount)
    {
        return capitalAccountMapper.insertCapitalAccount(capitalAccount);
    }

    /**
     * 修改资金账户
     * 
     * @param capitalAccount 资金账户
     * @return 结果
     */
    @Override
    public int updateCapitalAccount(CapitalAccount capitalAccount)
    {
        return capitalAccountMapper.updateCapitalAccount(capitalAccount);
    }

    /**
     * 批量删除资金账户
     * 
     * @param ids 需要删除的资金账户主键
     * @return 结果
     */
    @Override
    public int deleteCapitalAccountByIds(Long[] ids)
    {
        return capitalAccountMapper.deleteCapitalAccountByIds(ids);
    }

    /**
     * 删除资金账户信息
     * 
     * @param id 资金账户主键
     * @return 结果
     */
    @Override
    public int deleteCapitalAccountById(Long id)
    {
        return capitalAccountMapper.deleteCapitalAccountById(id);
    }
}
